<script>
import baseMiXin from "@/views/robotOffice/task/mixin/baseMiXin";

export default {
  name: "productDetails",
  mixins: [baseMiXin],
  data() {
    return {
      options: {
        defYesterday: true
      },
      form: {
        account: "",
        password: "",
      },
      rules: {
        account: [
          { required: true, message: "请输入账号", trigger: "blur" }
        ],
        password: [
          { required: true, message: "请输入密码", trigger: "blur" }
        ]
      }
    };
  },
  created() {},
  methods: {
    initParams({ account = "", password = "", defYesterday = true}) {
      this.form.account = account;
      this.form.password = password;
      this.options.defYesterday = defYesterday
    },
    checkParam() {
      let r = true
      this.$refs["form"].validate((valid) => {
        r = valid
        return r
      })
      if (!r){
        this.$message.warning("[商品数据-商品明细] 任务有参数填写错误")
      }
      return r
    },
    getParam() {
      return {
        defYesterday: this.options.defYesterday,
        account: this.form.account,
        password: this.form.password
      };
    },

  }
};
</script>

<template>
  <div>
    <el-form :model="form" ref="form" :rules="rules" label-width="60px" size="mini" label-position="left"
             label-suffix=" :">
      <el-form-item label="账号" prop="account" style="display: inline-block">
        <el-input v-model="form.account" placeholder="请输入账号" clearable style="width: 300px"></el-input>
      </el-form-item>
      <el-form-item label="密码" prop="password" style="display: inline-block;margin-left: 50px">
        <el-input v-model="form.password" placeholder="请输入密码" clearable show-password
                  style="width: 300px"></el-input>
      </el-form-item>
      <el-form-item label="数据日期" label-width="90px" prop="queryTimeList">
        <el-radio v-model="options.defYesterday" :label=true>昨日</el-radio>
      </el-form-item>
    </el-form>
  </div>
</template>

<style scoped>

</style>